<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title></title>
</head>
<body>
<script>
  var authCode = getUrlParam('auth_code')
  var toUrl = 'http://116.62.160.18:8086'
  var redirectUrl = 'https://zf.wuhanbus.com:1443/busLine/lineSet.html'
  var authUrl = 'https://openauth.alipay.com/oauth2/publicAppAuthorize.htm?app_id=2017022705927164&scope=auth_base&redirect_uri=' + encodeURIComponent(redirectUrl)
  if (authCode) {
    window.location.replace(toUrl + '/index.html#/Auth?redirectUrl=fromSelf&auth_code=' + authCode)
  } else {
    window.location.replace(authUrl)
  }

  function getUrlParam(name) {
    var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)')
    // 构造一个含有目标参数的正则表达式对象
    var r = window.location.search.substr(1).match(reg)
    // 匹配目标参数
    if (r != null) return unescape(r[2])
    return null // 返回参数值
  }
</script>
</body>
</html>
